home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 February / EnigmA AMIGA RUN 15 (1997)(G.R. Edizioni)(IT)[!][issue 1997-02][PLANET CD V].iso / enigma / earcd / emula / arosdv19.lha / AROS / devs / makefile < prev    next >
Makefile  |  1996-10-25  |  1KB  |  50 lines

  1. # $Id: makefile,v 1.11 1996/10/25 14:28:54 aros Exp $
  2. TOP=..
  3.  
  4. include $(TOP)/config/make.cfg
  5.  
  6. OBJDIR = $(GENDIR)/devs
  7.  
  8. DEVS = $(DEVSDIR)/ram.handler \
  9.     $(DEVSDIR)/nil.handler
  10.  
  11. FILES = console cdinputhandler rawkeyconvert
  12.  
  13. all: setup \
  14.     $(foreach f,$(FILES),$(OSGENDIR)/$(f).o) \
  15.     $(DEVS)
  16.  
  17. setup:
  18.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; else true ; fi
  19.     @if [ ! -d $(OBJDIR) ]; then $(MKDIR) $(OBJDIR) ; else true ; fi
  20.     @if [ ! -d $(DEVSDIR) ]; then $(MKDIR) $(DEVSDIR) ; else true ; fi
  21.  
  22. clean:
  23.     $(RM) $(OSGENDIR)
  24.     $(RM) $(DEVSDIR)
  25.  
  26. $(OSGENDIR)/%.o: %.c
  27.     $(CC) $(CFLAGS) $< -c -o $@ 2>&1|tee $*.err
  28.     if test ! -s $*.err; then rm $*.err ; else true ; fi
  29.  
  30. $(OBJDIR)/%.o: %.c
  31.     $(CC) $(CFLAGS) -c $< -o $@
  32.  
  33. $(DEVSDIR)/%.handler: $(OBJDIR)/%_handler.o
  34.     $(CC) $(ILDFLAGS) $< -o $@
  35.  
  36. $(OSGENDIR)/%.d: %.c
  37.     @if [ ! -d $(OSGENDIR) ]; then $(MKDIR) $(OSGENDIR) ; else true ; fi
  38.     @$(RM) $@
  39.     @touch $@
  40.     $(MKDEPEND) -p$(OSGENDIR)/
  41.  
  42. $(OBJDIR)/%.d: %.c
  43.     @if [ ! -d $(OBJDIR) ]; then $(MKDIR) $(OBJDIR) ; else true ; fi
  44.     @$(RM) $@
  45.     @touch $@
  46.     $(MKDEPEND) -p$(OBJDIR)/
  47.  
  48. include $(foreach f,$(FILES),$(OSGENDIR)/$(f).d)
  49. include $(OBJDIR)/ram_handler.d $(OBJDIR)/nil_handler.d
  50.